1. Field of the Invention
This invention relates to a device incorporating a Java (registered trademark) virtual machine, and more particularly relates to an object state transfer method, an object state transfer device, an object state transfer program, and a recording medium for the program which make it possible to reduce the overhead of transferring an object state to another host and to increase the capability of the overall system when synchronizing object states.
2. Description of the Related Art
In existing Java technology, to transfer the internal states (individual data for an object known as an instance variable) of a plurality of objects to an external device, the instances must be converted one by one into a byte sequence by a method known as serialization; the byte sequence is then transferred to the external device. This generates a large overhead when serializing. To perform serialization, the state of each individual member variable must be extracted by accessing each member variable, which represents the internal state of each instance, and the extracted states must be copied to a region for transfer where the byte sequence is to be stored, consequently increasing the overhead.
For example, in a cluster comprised of a plurality of hosts, when one of the hosts comprising the cluster has for some reason become incapable of continuing service, another host continues to supply the service in its place, keeping the system reliable. For another host to take over supplying the service, data (object state) relating to the service must be replicated by synchronization between the hosts comprising the cluster.
Serialization is performed at such a time, and the internal states of the plurality of objects are converted into a byte sequence, which is transferred to the other host, but the resultant overhead greatly affects the performance of the overall system.
A system utilizing the abovementioned cluster configuration is described in a document published on the Internet by BEA Systems, Inc. entitled “Weblogic Server Cluster User's Guide”; in this example, session takeover is achieved at failover by using serialization to replicate the session state.
In the conventional art described above, when a large amount of object states must be transferred, such as when synchronizing object states among a plurality of nodes (hosts) comprising a cluster in order to increase reliability, other processing becomes congested, leading to a considerable effect on the performance of the overall system.